if (cvar("samelevel")) // if samelevel is set, stay on same level
changelevel (mapname);
else
changelevel (nextmap);
};
void() ExitIntermission =
{
// skip any text in deathmatch
if (deathmatch)
{
GotoNextMap ();
return;
}
intermission_exittime = time + 1;
intermission_running = intermission_running + 1;
//
// run some text if at the end of an episode
//
if (intermission_running == 2)
{
if (world.model == "maps/e1m7.bsp")
{
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 2);
WriteByte (MSG_ALL, 3);
if (!cvar("registered"))
{
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "As the corpse of the monstrous entity\nChthon sinks back into the lava whence\nit rose, you grip the Rune of Earth\nMagic tightly. Now that you have\nconquered the Dimension of the Doomed,\nrealm of Earth Magic, you are ready to\ncomplete your task in the other three\nhaunted lands of Quake. Or are you? If\nyou don't register Quake, you'll never\nknow what awaits you in the Realm of\nBlack Magic, the Netherworld, and the\nElder World!");
}
else
{
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "As the corpse of the monstrous entity\nChthon sinks back into the lava whence\nit rose, you grip the Rune of Earth\nMagic tightly. Now that you have\nconquered the Dimension of the Doomed,\nrealm of Earth Magic, you are ready to\ncomplete your task. A Rune of magic\npower lies at the end of each haunted\nland of Quake. Go forth, seek the\ntotality of the four Runes!");
}
return;
}
else if (world.model == "maps/e2m6.bsp")
{
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 2);
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "The Rune of Black Magic throbs evilly in\nyour hand and whispers dark thoughts\ninto your brain. You learn the inmost\nlore of the Hell-Mother; Shub-Niggurath!\nYou now know that she is behind all the\nterrible plotting which has led to so\nmuch death and horror. But she is not\ninviolate! Armed with this Rune, you\nrealize that once all four Runes are\ncombined, the gate to Shub-Niggurath's\nPit will open, and you can face the\nWitch-Goddess herself in her frightful\notherworld cathedral.");
return;
}
else if (world.model == "maps/e3m6.bsp")
{
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 2);
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "The charred viscera of diabolic horrors\nbubble viscously as you seize the Rune\nof Hell Magic. Its heat scorches your\nhand, and its terrible secrets blight\nyour mind. Gathering the shreds of your\ncourage, you shake the devil's shackles\nfrom your soul, and become ever more\nhard and determined to destroy the\nhideous creatures whose mere existence\nthreatens the souls and psyches of all\nthe population of Earth.");
return;
}
else if (world.model == "maps/e4m7.bsp")
{
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 2);
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "Despite the awful might of the Elder\nWorld, you have achieved the Rune of\nElder Magic, capstone of all types of\narcane wisdom. Beyond good and evil,\nbeyond life and death, the Rune\npulsates, heavy with import. Patient and\npotent, the Elder Being Shub-Niggurath\nweaves her dire plans to clear off all\nlife from the Earth, and bring her own\nfoul offspring to our world! For all the\ndwellers in these nightmare dimensions\nare her descendants! Once all Runes of\nmagic power are united, the energy\nbehind them will blast open the Gateway\nto Shub-Niggurath, and you can travel\nthere to foil the Hell-Mother's plots\nin person.");
return;
}
//HIPNOTIC
if (world.model == "maps/hip1m4.bsp")
{
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 6);
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
/*
**************************************
Deep within the bowels of the
Research Facility, you discover the
passage that the followers of Quake
have used to enter our world.
The bastards used some type of
gigantic teleporter to overload
one of our own slipgates! As long as
this portal exists, Earth will never
be safe from Quake's cruel minions.
If you can find the source of the
portal's power, you can shut it
down--possibly forever! With only a
moment's consideration for your own
safety, you re-enter the dark domain,
knowing Hell would be a better fate
than experiencing the reign of Quake.
*/
WriteString (MSG_ALL, "Deep within the bowels of the\nResearch Facility, you discover the\npassage that the followers of Quake\nhave used to enter our world.\nThe bastards used some type of\ngigantic teleporter to overload\none of our own slipgates! As long as\nthis portal exists, Earth will never\nbe safe from Quake's cruel minions." );
//WriteString (MSG_ALL, "If you can find the source of the\nportal's power, you can shut it\ndown--possibly forever! With only a\nmoment's consideration for your own\nsafety, you re-enter the dark domain,\nknowing Hell would be a better fate\nthan experiencing the reign of Quake." );
return;
}
else if (world.model == "maps/hip2m5.bsp")
{
/*
**************************************
After destroying the power generator,
you pass beyond the gate of Mortum's
Keep. A wave of nausea suddenly flows
over you and you find yourself cast
out into a liquid void. You float
lifelessly, yet aware, in a lavender
sea of energy.
After what seems like an eternity,
you feel the presence of a diabolical
intelligence. You are held helpless
for a moment as your mind is open to
that of Armagon--Quake's General and
master of this realm. Recognizing
you as the one who foiled his
attempt to conquer Earth, a hellish
howl fills your mind and blots out
all consciousness. When you awake,
you find yourself on the shores of
reality, but in a time and place
unknown to you.
*/
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 6);
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "After destroying the power generator,\nyou pass beyond the gate of Mortum's\nKeep. A wave of nausea suddenly flows\nover you and you find yourself cast\nout into a liquid void. You float\nlifelessly, yet aware, in a lavender\nsea of energy." );
//WriteString (MSG_ALL, "After what seems like an eternity,\nyou feel the presence of a diabolical\nintelligence. You are held helpless\nfor a moment as your mind is open to\nthat of Armagon--Quake's General and\nmaster of this realm. Recognizing\nyou as the one who foiled his\nattempts to conquer Earth, a hellish\nhowl fills your mind and blots out\nall consciousness. When you awake,\nyou find yourself on the shores of\nreality, but in a time and place\nunknown to you." );
return;
}
else if (world.model == "maps/hipend.bsp")
{
/*
**************************************
After the last echoes of Armagon's
death yell fade away, you breathe a
heavy sigh of relief. With the loss
of his magic, Armagon's fortress
begins to collapse. The rift he
created to send his grisly troops
through time slowly closes and seals
itself forever. In the chaos that
ensues, a wall collapses, revealing
one remaining time portal. With your
chances to escape rapidly growing
slim, you race for the portal,
mindless of your destination. In a
flash of light, you find yourself
back at Command HQ, safe and sound.
Congratulations! You are victorious!
The minions of Quake have once again
fallen before your mighty hand.
Is this the last you will see of
Quake's hellions?
Only time will tell...
*/
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 2);
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "After the last echoes of Armagon's\ndeath yell fade away, you breathe a\nheavy sigh of relief. With the loss\nof his magic, Armagon's fortress\nbegins to collapse. The rift he\ncreated to send his grisly troops\nthrough time slowly closes and seals\nitself forever. In the chaos that\nensues, a wall collapses, revealing\none remaining time portal. With your\nchances to escape rapidly growing\nslim, you race for the portal,\nmindless of your destination. In a\nflash of light, you find yourself\nback at Command HQ, safe and sound." );
//WriteString (MSG_ALL, "Congratulations! You are victorious!\nThe minions of Quake have once again\nfallen before your mighty hand.\nIs this the last you will see of\nQuake's hellions?\n\nOnly time will tell..." );
//intermission_exittime = time + 10000000; // never allow exit
return;
}
GotoNextMap();
}
if (intermission_running == 3)
{
if (!cvar("registered"))
{ // shareware episode has been completed, go to sell screen
WriteByte (MSG_ALL, SVC_SELLSCREEN);
return;
}
if ( (serverflags&15) == 15)
{
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "Now, you have all four Runes. You sense\ntremendous invisible forces moving to\nunseal ancient barriers. Shub-Niggurath\nhad hoped to use the Runes Herself to\nclear off the Earth, but now instead,\nyou will use them to enter her home and\nconfront her as an avatar of avenging\nEarth-life. If you defeat her, you will\nbe remembered forever as the savior of\nthe planet. If she conquers, it will be\nas if you had never been born.");
return;
}
//HIPNOTIC
if (world.model == "maps/hip1m4.bsp")
{
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "If you can find the source of the\nportal's power, you can shut it\ndown--possibly forever! With only a\nmoment's consideration for your own\nsafety, you re-enter the dark domain,\nknowing Hell would be a better fate\nthan experiencing the reign of Quake." );
return;
}
else if (world.model == "maps/hip2m5.bsp")
{
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "After what seems like an eternity,\nyou feel the presence of a diabolical\nintelligence. You are held helpless\nfor a moment as your mind is open to\nthat of Armagon--Quake's General and\nmaster of this realm. Recognizing\nyou as the one who foiled his\nattempt to conquer Earth, a hellish\nhowl fills your mind and blots out\nall consciousness. When you awake,\nyou find yourself on the shores of\nreality, but in a time and place\nunknown to you." );
return;
}
else if (world.model == "maps/hipend.bsp")
{
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "Congratulations! You are victorious!\nThe minions of Quake have once again\nfallen before your mighty hand.\nIs this the last you will see of\nQuake's hellions?\n\nOnly time will tell..." );
intermission_exittime = time + 10000000; // never allow exit
return;
}
}
GotoNextMap();
};
/*
============
IntermissionThink
When the player presses attack or jump, change to the next level
============
*/
void() IntermissionThink =
{
if (time < intermission_exittime)
return;
if (!self.button0 && !self.button1 && !self.button2)
return;
ExitIntermission ();
};
void() execute_changelevel =
{
local entity pos;
intermission_running = 1;
// enforce a wait time before allowing changelevel
if (deathmatch)
intermission_exittime = time + 5;
else
intermission_exittime = time + 2;
WriteByte (MSG_ALL, SVC_CDTRACK);
WriteByte (MSG_ALL, 9);
WriteByte (MSG_ALL, 3);
pos = FindIntermission ();
other = find (world, classname, "player");
while (other != world)
{
other.view_ofs = '0 0 0';
other.angles = other.v_angle = pos.mangle;
other.fixangle = TRUE; // turn this way immediately
When the player touches this, he gets sent to the map listed in the "map" variable. Unless the NO_INTERMISSION flag is set, the view will go to the info_intermission spot and display stats.
*/
void() trigger_changelevel =
{
if (!self.map)
objerror ("chagnelevel trigger doesn't have map");